1. Field of the Invention
The present invention relates to an image processing apparatus, a method for processing an image, and a program therefor.
2. Description of the Related Art
With an apparatus for scanning a color image using a scanner and outputting a copy of the color image, it is demanded that the output copy is reproduced as faithfully as possible in color reproducibility and tonability of the original color image. However, there is a demand that, if the color image has a background portion, the background portion be reproduced in white on an output copy product.
Japanese Patent Application Laid-Open No. 5-63968 discusses a technique for acquiring a background removal level from histograms of R, G, and B color components and performing nonlinear background removal. This technique makes it possible to constantly reproduce the background portion as a white level of transfer sheet (background removal level) without degrading color reproducibility of a non-background.
In a case of scanning a color image using a color scanner and printing the image in monochrome in a conventional color copying machine, monochromization processing is applied to color image data (for example, RGB image data) generated by the color scanner to generate monochromized image data, and then background removal processing is applied to the monochromized image data. However, there is a case where applying the background removal processing to the monochromized image data causes disappearance of apart of color information (for example, bright colors and fluorescent colors) depending on the method of converting color image data into monochrome image data.
For example, as illustrated in FIG. 16B, yellow text in the RGB image data has RGB values of R:250, G:240, B:140 and the background portion has RGB values of R:250, G:251, B:248. The background removal processing converts RGB values equal to or greater than the background removal level to R:255, G:255, B:255. After the monochromization processing is applied to the RGB image data, yellow text has a luminance value of 233 and a background portion has a luminance value of 250. Then, after the background removal processing (with a background removal level of 230) is applied to the monochromized image data, both yellow text and the background portion have luminance values of R:255, G:255, B:255, causing disappearance of information about yellow text.
To solve the above-mentioned problem, the background removal processing is applied to the RGB image data before the monochromization processing is applied thereto. In this case, however, there is a case where the background portion having large differences in R, G, and B values cannot be removed, possibly degrading the image quality.
For example, as illustrated in FIG. 16A, there is a problem that, after the background removal processing (with a background removal level of 230) is applied to the RGB image data before the monochromization processing is applied thereto, the background having large differences in RGB signal value cannot be removed. For example, when a background has RGB values of R:250, G:240, B:140, the monochromization processing of the RGB image data, after the background removal processing (with a background removal level of 230) is applied thereto, produces RGB values of R:245, G:245, B:245. Japanese Patent Application Laid-Open No. 5-63968 does not discuss the background removal processing performed in a case of scanning a color image using a color scanner and printing the image in monochrome.